import Vue from 'vue'
import Router from 'vue-router'

const _import = require('./_import_' + process.env.NODE_ENV)
// in development-env not use lazy-loading, because lazy-loading too many pages will cause webpack hot update too slow. so only in production use lazy-loading;
// detail: https://panjiachen.github.io/vue-element-admin-site/#/lazy-loading

Vue.use(Router)

/* Layout */
import Layout from '../views/layout/Layout'

/** note: submenu only apppear when children.length>=1
 *   detail see  https://panjiachen.github.io/vue-element-admin-site/#/router-and-nav?id=sidebar
 **/

/**
 * hidden: true                   if `hidden:true` will not show in the sidebar(default is false)
 * redirect: noredirect           if `redirect:noredirect` will no redirct in the breadcrumb
 * name:'router-name'             the name is used by <keep-alive> (must set!!!)
 * meta : {
    roles: ['admin','editor']     will control the page roles (you can set multiple roles)
    title: 'title'               the name show in submenu and breadcrumb (recommend set)
    icon: 'svg-name'             the icon show in the sidebar,
    noCache: true                if fasle ,the page will no be cached(default is false)
  }
 **/
export const constantRouterMap = [{
  path: '/login',
  component: _import('login/index'),
  hidden: true
},
{
  path: '/password',
  component: _import('login/retrievePassword'),
  hidden: true
},
{
  path: '/authredirect',
  component: _import('login/authredirect'),
  hidden: true
},
{
  path: '/404',
  component: _import('errorPage/404'),
  hidden: true
},
{
  path: '/401',
  component: _import('errorPage/401'),
  hidden: true
},
{
  path: '',
  component: Layout,
  redirect: 'OMS',
  children: [{
    path: 'OMS',
    component: _import('dashboard/index'),
    name: 'OMS',
    meta: {
      title: 'OMS',
      icon: 'dashboard',
      noCache: true
    }
  }]
}
]

// export default new Router({
//   // mode: 'history', // require service support
//   scrollBehavior: () => ({
//     y: 0
//   }),
//   routes: constantRouterMap
// })

// const rotuers = new Router({
//  // mode: 'history', // 后端支持可开
//   scrollBehavior: () => ({ y: 0 }),
//   routes: constantRouterMap
// })
// rotuers.addRoutes([{ path: '*', name: '404', redirect: '/404' }])

// export default rotuers


export const asyncRouterMap = [{
  path: '/systemManager',
  component: Layout,
  name: '系统配置管理',
  icon: 'setting',
  authority: 'systemManager',
  children: [{
    path: 'menuManager',
    icon: 'category',
    component: _import('admin/menu/index'),
    name: '菜单管理',
    authority: 'menuManager',
    meta: {
      title: 'menuManager',
      icon: 'nav-organization',
      name: '菜单管理'
    }
  },
  {
    path: 'gateLogManager',
    icon: 'category',
    component: _import('e-formula/admin/gateLog/index'),
    name: '操作日志',
    authority: 'gateLogManager',
    meta: {
      title: 'gateLogManager',
      icon: 'nav-organization',
      name: '操作日志'
    }
  }
  ]
},
{
  path: '/staffing',
  component: Layout,
  name: '人员配置',
  icon: 'setting',
  authority: 'staffing',
  children: [
    {
      path: 'dailyWhiteList',
      icon: 'category',
      component: _import('e-formula/management/dailyWhiteList'),
      name: '免填日报白名单',
      authority: 'dailyWhiteList',
      meta: {
        title: 'dailyWhiteList',
        icon: 'nav-organization',
        name: '免填日报白名单'
      }
    },
    {
      path: 'costWhiteList',
      icon: 'category',
      component: _import('e-formula/management/costWhiteList'),
      name: '免计成本白名单',
      authority: 'costWhiteList',
      meta: {
        title: 'costWhiteList',
        icon: 'nav-organization',
        name: '免计成本白名单'
      }
    },
    {
      path: 'dailyReportManagement',
      icon: 'category',
      component: _import('e-formula/management/dailyReportManagement'),
      name: '待提交日报管理',
      authority: 'dailyReportManagement',
      meta: {
        title: 'dailyReportManagement',
        icon: 'nav-organization',
        name: '待提交日报管理'
      }
    }
  ]
},
{
  path: '/managementCost',
  component: Layout,
  name: '利润占比及管销费用',
  icon: 'setting',
  authority: 'managementCost',
  children: [{
    path: 'profitSharing',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/managementCost/profitSharing'),
    name: '专案利润分摊',
    authority: 'profitSharing',
    meta: {
      title: 'profitSharing',
      icon: 'nav-organization',
      name: '专案利润分摊'
    }
  }, {
    path: 'buActualCost',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/managementCost/buActualCost'),
    name: 'BU实际成本登录',
    authority: 'buActualCost',
    meta: {
      title: 'buActualCost',
      icon: 'nav-organization',
      name: 'BU实际成本登录'
    }
  }]
},
{
  path: '/baseManager',
  component: Layout,
  name: '系统管理',
  icon: 'setting',
  authority: 'baseManager',
  children: [{
    path: 'notificationManager',
    icon: 'fa-user',
    component: _import('e-formula/notification/index'),
    name: '公告管理',
    authority: 'notificationManager',
    meta: {
      title: 'notificationManager',
      icon: 'nav-organization',
      name: '公告管理'
    }
  }, {
    path: 'notificationManagerEdit',
    component: _import('e-formula/notification/edit'),
    name: '编辑公告',
    authority: 'notificationManagerEdit',
    meta: {
      title: 'notificationManagerEdit',
      icon: 'nav-organization',
      name: '编辑公告'
    }
  }, {
    path: 'roleManager',
    icon: 'fa-user',
    component: _import('e-formula/roleManager/index'),
    name: '角色管理',
    authority: 'roleManager',
    meta: {
      title: 'roleManager',
      icon: 'nav-organization',
      name: '角色管理'
    }
  }, {
    path: 'userManager',
    icon: 'fa-user',
    component: _import('e-formula/admin/user/index'),
    name: '用户管理',
    authority: 'userManager',
    meta: {
      title: 'userManager',
      icon: 'nav-organization',
      name: '用户管理'
    }
  },
  {
    path: 'peopleManager',
    icon: 'category',
    component: _import('e-formula/peopleManager/index'),
    name: '人员管理',
    authority: 'peopleManager',
    meta: {
      title: 'peopleManager',
      icon: 'nav-organization',
      name: '人员管理'
    }
  },
  {
    path: 'bu',
    icon: 'category',
    component: _import('e-formula/bu/index'),
    name: 'BU资讯',
    authority: 'bu',
    meta: {
      title: 'bu',
      icon: 'nav-organization',
      name: 'BU资讯'
    }
  },
  {
    path: 'customer',
    icon: 'category',
    component: _import('e-formula/customer/index'),
    name: '客户资讯',
    authority: 'customer',
    meta: {
      title: 'customer',
      icon: 'nav-organization',
      name: '客户资讯'
    }
  },
  {
    path: 'dictManager',
    icon: 'viewlist',
    component: _import('e-formula/dict/index'),
    name: '数据字典',
    authority: 'dictManager',
    meta: {
      title: 'dictManager',
      icon: 'nav-organization',
      name: '数据字典'
    }
  },
  {
    path: 'dictManagerDetail',
    icon: 'fa-user',
    component: _import('e-formula/dict/detail'),
    name: '字典详情',
    authority: 'dictManagerDetail',
    meta: {
      title: 'dictManagerDetail',
      icon: 'nav-organization',
      name: '字典详情'
    }
  },
  {
    path: 'importRemittance',
    icon: 'fa-user',
    component: _import('e-formula/importRemittance/index'),
    name: '我的汇入汇出',
    authority: 'importRemittance',
    meta: {
      title: 'importRemittance',
      icon: 'nav-organization',
      name: '我的汇入汇出'
    }
  },
  {
    path: 'projectDataEdit',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/projectRevenue/projectDataEdit'),
    name: 'Data表编辑',
    authority: 'projectDataEdit',
    meta: {
      title: 'projectDataEdit',
      icon: 'nav-organization',
      name: 'Data表编辑'
    }
  },
  {
    path: 'employeeHourlyWage',
    icon: 'fa-user',
    component: _import('e-formula/employeeHourlyWage/index'),
    name: '人员历史记录',
    authority: 'employeeHourlyWage',
    meta: {
      title: 'employeeHourlyWage',
      icon: 'nav-organization',
      name: '人员历史记录'
    }
  },
  {
    path: 'salesTarget',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/buInspection/salesTarget'),
    name: 'SalesTarget维护',
    authority: 'salesTarget',
    meta: {
      title: 'salesTarget',
      icon: 'nav-organization',
      name: 'SalesTarget维护'
    }
  },
  {
    path: 'projectProcessAdd',
    icon: 'category',
    component: _import('e-formula/projectProcess/add'),
    name: '维护模板',
    authority: 'projectProcessAdd',
    meta: {
      title: 'projectProcessAdd',
      icon: 'nav-organization',
      name: '维护模板'
    }
  },
  {
    path: 'project',
    icon: 'category',
    component: _import('e-formula/project/index'),
    name: '专案资讯',
    authority: 'project',
    meta: {
      title: 'project',
      icon: 'nav-organization',
      name: '专案资讯'
    }
  },
  {
    path: 'projectProcess',
    icon: 'category',
    component: _import('e-formula/projectProcess/index'),
    name: '专案进度模板配置',
    authority: 'projectProcess',
    meta: {
      title: 'projectProcess',
      icon: 'nav-organization',
      name: '专案进度模板配置'
    }
  },
  {
    path: 'exchangeRate',
    icon: 'category',
    component: _import('e-formula/exchangeRate/index'),
    name: '汇率管理',
    authority: 'exchangeRate',
    meta: {
      title: 'exchangeRate',
      icon: 'nav-organization',
      name: '汇率管理'
    }
  }
  ]
},
{
  path: '/targetSetting',
  component: Layout,
  name: '目标设定',
  icon: 'setting',
  authority: 'targetSetting',
  meta: {
    title: 'targetSetting',
    icon: 'nav-organization',
    name: '目标设定'
  },
  children: [{
    path: 'worksTarget',
    icon: 'fa-user',
    component: _import('e-formula/worksTarget/index'),
    name: '工务目标设定',
    authority: 'worksTarget',
    meta: {
      title: 'worksTarget',
      icon: 'nav-organization',
      name: '工务目标设定'
    }
  }, {
    path: 'worksTargetEdit',
    icon: 'fa-user',
    component: _import('e-formula/worksTarget/edit'),
    name: '编辑工务目标',
    authority: 'worksTargetEdit',
    meta: {
      title: 'worksTargetEdit',
      icon: 'nav-organization',
      name: '编辑工务目标'
    }
  }, {
    path: 'worksTargetDetail',
    icon: 'fa-user',
    component: _import('e-formula/worksTarget/detail'),
    name: '查看年度初始工务目标',
    authority: 'worksTargetDetail',
    meta: {
      title: 'worksTargetDetail',
      icon: 'nav-organization',
      name: '查看年度初始工务目标'
    }
  }, {
    path: 'businessTarget',
    icon: 'fa-user',
    component: _import('e-formula/businessTarget/index'),
    name: '业务目标设定',
    authority: 'businessTarget',
    meta: {
      title: 'businessTarget',
      icon: 'nav-organization',
      name: '业务目标设定'
    }
  }, {
    path: 'businessTargetEdit',
    icon: 'fa-user',
    component: _import('e-formula/businessTarget/edit'),
    name: '编辑业务目标设定',
    authority: 'businessTargetEdit',
    meta: {
      title: 'businessTargetEdit',
      icon: 'nav-organization',
      name: '编辑业务目标设定'
    }
  }, {
    path: 'businessTargetDetail',
    icon: 'fa-user',
    component: _import('e-formula/businessTarget/details'),
    name: '查看年度初始业务目标',
    authority: 'businessTargetDetail',
    meta: {
      title: 'businessTargetDetail',
      icon: 'nav-organization',
      name: '查看年度初始业务目标'
    }
  }]
},
{
  path: '/dailyManagement',
  component: Layout,
  name: '人员日报管理',
  icon: 'setting',
  authority: 'dailyManagement',
  meta: {
    title: 'dailyManagementList',
    icon: 'nav-organization',
    name: '人员日报管理'
  },
  children: [{
    path: 'myDaily',
    icon: 'fa-user',
    component: _import('e-formula/dailyAdministrator/myDaily'),
    name: '我的日报',
    authority: 'myDaily',
    meta: {
      title: 'myDaily',
      icon: 'nav-organization',
      name: '我的日报'
    }
  }, {
    path: 'myDailyDetails',
    icon: 'fa-user',
    component: _import('e-formula/dailyAdministrator/myDailyDetails'),
    name: '日报详情填写',
    authority: 'myDailyDetails',
    meta: {
      title: 'myDailyDetails',
      icon: 'nav-organization',
      name: '日报详情填写'
    }
  }, {
    path: 'myDailyManage',
    icon: 'fa-user',
    component: _import('e-formula/dailyAdministrator/myDailyManage'),
    name: '我管理下的日报',
    authority: 'myDailyManage',
    meta: {
      title: 'myDailyManage',
      icon: 'nav-organization',
      name: '我管理下的日报'
    }
  }, {
    path: 'myDailyManageLook',
    icon: 'fa-user',
    component: _import('e-formula/dailyAdministrator/myDailyManageLook'),
    name: '日报详情查看',
    authority: 'myDailyManageLook',
    meta: {
      title: 'myDailyManageLook',
      icon: 'nav-organization',
      name: '日报详情查看'
    }
  }]
},
{
  path: '/demandManager',
  component: Layout,
  name: '需求进度管理',
  icon: 'setting',
  authority: 'demandManager',
  meta: {
    title: 'demandManager',
    icon: 'nav-organization',
    name: '需求进度管理'
  },
  children: [{
    path: 'maintenance',
    icon: 'fa-user',
    component: _import('e-formula/specialApplication/maintenance'),
    name: '商机维护',
    authority: 'maintenance',
    meta: {
      title: 'maintenance',
      icon: 'nav-organization',
      name: '商机维护'
    }
  },
  {
    path: 'specialApplication',
    icon: 'fa-user',
    component: _import('e-formula/specialApplication/index'),
    name: '专编申请',
    authority: 'specialApplication',
    meta: {
      title: 'specialApplication',
      icon: 'nav-organization',
      name: '专编申请'
    }
  }, {
    path: 'myQuotes',
    icon: 'fa-user',
    component: _import('e-formula/myQuotes/index'),
    name: '我的报价',
    authority: 'myQuotes',
    meta: {
      title: 'myQuotes',
      icon: 'nav-organization',
      name: '我的报价'
    }
  }, {
    path: 'demandQuotation',
    icon: 'fa-user',
    component: _import('e-formula/demandQuotation/index'),
    name: '需求报价单维护',
    authority: 'demandQuotation',
    meta: {
      title: 'demandQuotation',
      icon: 'nav-organization',
      name: '需求报价单维护'
    }
  }, {
    path: 'myApplication',
    icon: 'fa-user',
    component: _import('e-formula/management/myApplication'),
    name: '我的申请',
    authority: 'myApplication',
    meta: {
      title: 'myApplication',
      icon: 'nav-organization',
      name: '我的申请'
    }
  }
  ]
},
{
  path: '/progressManager',
  component: Layout,
  name: '工务进度追踪管理',
  icon: 'setting',
  authority: 'progressManager',
  meta: {
    title: 'progressManager',
    icon: 'nav-organization',
    name: '工务进度追踪管理'
  },
  children: [{
    path: 'progressList',
    icon: 'fa-user',
    component: _import('e-formula/scheduleManager/progressList'),
    name: '工务进度列表',
    authority: 'progressList',
    meta: {
      title: 'progressList',
      icon: 'nav-organization',
      name: '工务进度列表'
    }
  },
  {
    path: 'worksDetails',
    icon: 'fa-user',
    component: _import('e-formula/scheduleManager/worksDetails'),
    name: '工务进度详情',
    authority: 'worksDetails',
    meta: {
      title: 'worksDetails',
      icon: 'nav-organization',
      name: '工务进度详情'
    }
  }, 
   {
    path: 'lead',
    icon: 'fa-user',
    component: _import('e-formula/scheduleManager/lead'),
    name: '資料多筆匯入',
    authority: 'lead',
    meta: {
      title: 'lead',
      icon: 'nav-organization',
      name: '資料多筆匯入'
    }
  }, 
  {
    path: 'vendorEngineering',
    icon: 'fa-user',
    component: _import('e-formula/scheduleManager/vendorEngineering'),
    name: '厂商评鉴管理（工程类）',
    authority: 'vendorEngineering',
    meta: {
      title: 'vendorEngineering',
      icon: 'nav-organization',
      name: '厂商评鉴管理（工程类）'
    }
  }, {
    path: 'vendorConsumables',
    icon: 'fa-user',
    component: _import('e-formula/scheduleManager/vendorConsumables'),
    name: '厂商评鉴（零件耗材）',
    authority: 'vendorConsumables',
    meta: {
      title: 'vendorConsumables',
      icon: 'nav-organization',
      name: '厂商评鉴（零件耗材）'
    }
  }, {
    path: 'businessManager',
    icon: 'fa-user',
    component: _import('e-formula/scheduleManager/businessManager'),
    name: '业务报价单管理',
    authority: 'businessManager',
    meta: {
      title: 'businessManager',
      icon: 'nav-organization',
      name: '业务报价单管理'
    }
  }, {
    path: 'manufacturerTicket',
    icon: 'fa-user',
    component: _import('e-formula/scheduleManager/manufacturerTicket'),
    name: '通知厂商开发票',
    authority: 'manufacturerTicket',
    meta: {
      title: 'manufacturerTicket',
      icon: 'nav-organization',
      name: '通知厂商开发票'
    }
  }
  ]
},
{
  path: '/travelManagement',
  component: Layout,
  name: '差旅费管理',
  icon: 'setting',
  authority: 'travelManagement',
  meta: {
    title: 'travelManagement',
    icon: 'nav-organization',
    name: '差旅费管理'
  },
  children: [{
    path: 'travelApplication',
    icon: 'fa-user',
    component: _import('e-formula/travelManagement/travelApplication'),
    name: '差旅费申请',
    authority: 'travelApplication',
    meta: {
      title: 'travelApplication',
      icon: 'nav-organization',
      name: '差旅费申请'
    }
  }, {
    path: 'travelApplicationDetails',
    icon: 'fa-user',
    component: _import('e-formula/travelManagement/travelApplicationDetails'),
    name: '差旅费申请详情',
    authority: 'travelApplicationDetails',
    meta: {
      title: 'travelApplicationDetails',
      icon: 'nav-organization',
      name: '差旅费申请详情'
    }
  }
  ]
},
{
  path: '/purchasingManagement',
  component: Layout,
  name: '采购进度管理',
  icon: 'setting',
  authority: 'purchasingManagement',
  meta: {
    title: 'purchasingManagement',
    icon: 'nav-organization',
    name: '采购进度管理'
  },
  children: [{
    path: 'vendorRanking',
    icon: 'fa-user',
    component: _import('e-formula/purchasingManagement/VendorRanking/index'),
    name: '厂商排名表',
    authority: 'vendorRanking',
    meta: {
      title: '廠商排名表',
      icon: 'nav-organization',
      name: '廠商排名表'
    }
  },
  {
    path: 'vendor',
    icon: 'category',
    component: _import('e-formula/vendor/index'),
    name: '厂商资讯',
    authority: 'vendor',
    meta: {
      title: 'vendor',
      icon: 'nav-organization',
      name: '厂商资讯'
    }
  }
  ]
},
{
  path: '/pmoReport',
  component: Layout,
  icon: 'setting',
  authority: 'pmoReport',
  meta: {
    title: 'pmoReport',
    icon: 'nav-organization'
  },
  children: [{
    path: 'SalesSummary',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/SalesSummary/index'),
    name: 'SalesReport',
    authority: 'SalesSummary',
    meta: {
      title: 'SalesSummary',
      icon: 'nav-organization',
      name: 'SalesReport'
    }
  }, {
    path: 'cashFlowForm',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/cashFlowForm/index'),
    name: '现金流报表流程',
    authority: 'cashFlowForm',
    meta: {
      title: 'cashFlowForm',
      icon: 'nav-organization',
      name: '现金流报表流程'
    }
  }, {
    path: 'dailyHrsReport',
    icon: 'fa-user',
    component: _import('e-formula/dailyAdministrator/myDailyHrsReport'),
    name: '人员工时报表',
    authority: 'dailyHrsReport',
    meta: {
      title: 'dailyHrsReport',
      icon: 'nav-organization',
      name: '人员工时报表'
    }
  }]
},
{
  path: '/operationAnalysisForm',
  component: Layout,
  name: '营运分析报表',
  icon: 'setting',
  authority: 'operationAnalysisForm',
  meta: {
    title: 'operationAnalysisForm',
    icon: 'nav-organization',
    name: '营运分析报表'
  },
  children: [{
    path: 'businessObjectives',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/operationAnalysisForm/businessObjectives'),
    name: '业务目标与现况',
    authority: 'businessObjectives',
    meta: {
      title: 'businessObjectives',
      icon: 'nav-organization',
      name: '业务目标与现况'
    }
  }, {
    path: 'publicWorksTarget',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/operationAnalysisForm/publicWorksTarget'),
    name: '工务目标与现况',
    authority: 'publicWorksTarget',
    meta: {
      title: 'publicWorksTarget',
      icon: 'nav-organization',
      name: '工务目标与现况'
    }
  }]
},
{
  path: '/projectIncome',
  component: Layout,
  name: '专案报表查询',
  icon: 'setting',
  authority: 'projectIncome',
  meta: {
    title: 'projectIncome',
    icon: 'nav-organization',
    name: '专案报表查询'
  },
  children: [{
    path: 'numberMode',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/projectIncome/numberMode'),
    name: '件数模式',
    authority: 'numberMode',
    meta: {
      title: 'numberMode',
      icon: 'nav-organization',
      name: '件数模式'
    }
  }, {
    path: 'projectControlOSP',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/projectIncome/projectControlOSP'),
    name: '专案管控表（OSP）',
    authority: 'projectControlOSP',
    meta: {
      title: 'projectControlOSP',
      icon: 'nav-organization',
      name: '专案管控表（OSP）'
    }
  }, {
    path: 'projectControl',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/projectIncome/projectControl'),
    name: '专案管控表',
    authority: 'projectControl',
    meta: {
      title: 'projectControl',
      icon: 'nav-organization',
      name: '专案管控表'
    }
  }]
},
{
  path: '/buInspection',
  component: Layout,
  name: 'BU现况检视报表',
  icon: 'setting',
  authority: 'buInspection',
  meta: {
    title: 'buInspection',
    icon: 'nav-organization',
    name: 'BU现况检视报表'
  },
  children: [{
    path: 'buWorks',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/buInspection/buWorks'),
    name: 'BU工务现况检视表',
    authority: 'buWorks',
    meta: {
      title: 'buWorks',
      icon: 'nav-organization',
      name: 'BU工务现况检视表'
    }
  }, {
    path: 'buBusiness',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/buInspection/buBusiness'),
    name: 'BU业务现况检视表',
    authority: 'buBusiness',
    meta: {
      title: 'buBusiness',
      icon: 'nav-organization',
      name: 'BU业务现况检视表'
    }
  }]
},
{
  path: '/projectRevenue',
  component: Layout,
  name: '专案收入报表',
  icon: 'setting',
  authority: 'projectRevenue',
  meta: {
    title: 'projectRevenue',
    icon: 'nav-organization',
    name: '专案收入报表'
  },
  children: [{
    path: 'dataReport',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/projectRevenue/dataReport'),
    name: 'Data报表',
    authority: 'dataReport',
    meta: {
      title: 'dataReport',
      icon: 'nav-organization',
      name: 'Data报表'
    }
  },
  {
    path: 'cooReport',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/projectRevenue/cooReport'),
    name: '专收报表_BU/专编',
    authority: 'cooReport',
    meta: {
      title: 'cooReport',
      icon: 'nav-organization',
      name: '专收报表_BU/专编'
    }
  }, {
    path: 'overallReport',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/projectRevenue/overallReport'),
    name: 'Overall报表',
    authority: 'overallReport',
    meta: {
      title: 'overallReport',
      icon: 'nav-organization',
      name: 'Overall报表'
    }
  }, {
    path: 'buPieChart',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/projectRevenue/index'),
    name: '图表管理',
    authority: 'buPieChart',
    meta: {
      title: 'buPieChart',
      icon: 'nav-organization',
      name: '图表管理'
    }
  }]
},
{
  path: '/expensesStatisticsManage',
  component: Layout,
  icon: 'setting',
  authority: 'expensesStatisticsManage',
  meta: {
    title: 'expensesStatisticsManage',
    icon: 'nav-organization'
  },
  children: [{
    path: 'expensesStatistics',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/expensesStatisticsManage/expensesStatistics'),
    name: '个人差旅费用统计表',
    authority: 'expensesStatistics',
    meta: {
      title: 'expensesStatistics',
      icon: 'nav-organization',
      name: '个人差旅费用统计表'
    }
  }, {
    path: 'expensesStatisticsMonth',
    icon: 'fa-user',
    component: _import('e-formula/pmoReport/expensesStatisticsManage/expensesStatisticsMonth'),
    name: '员工差旅费用月报表',
    authority: 'expensesStatisticsMonth',
    meta: {
      title: 'expensesStatisticsMonth',
      icon: 'nav-organization',
      name: '员工差旅费用月报表'
    }
  }]
},
{
  path: '/meetingManagement',
  component: Layout,
  name: '会议管理',
  icon: 'setting',
  authority: 'meetingManagement',
  meta: {
    title: 'meetingManagement',
    icon: 'nav-organization',
    name: '会议管理'
  },
  children: [{
    path: 'businessMeeting',
    icon: 'fa-user',
    component: _import('e-formula/meetingManagement/businessMeeting'),
    name: '商机会议管理',
    authority: 'businessMeeting',
    meta: {
      title: 'businessMeeting',
      icon: 'nav-organization',
      name: '商机会议管理'
    }
  }, {
    path: 'projectMeeting',
    icon: 'fa-user',
    component: _import('e-formula/meetingManagement/projectMeeting'),
    name: '专案会议管理',
    authority: 'projectMeeting',
    meta: {
      title: 'projectMeeting',
      icon: 'nav-organization',
      name: '专案会议管理'
    }
  }]
}
]


const rotuers = new Router({
  // mode: 'history', //后端支持可开
  scrollBehavior: () => ({
    y: 0
  }),
  routes: constantRouterMap
})

export default rotuers
